<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >
<head>
	<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
	<title>EJS - Embedded JavaScript - Demo</title>
	<link rel="stylesheet" href="example.css" type="text/css" media="screen" />
    <script src="../lib/prototype.js" type="text/javascript"></script>
	<script src="../src/ejs.js" type="text/javascript"></script>
	<script src="example.js" type="text/javascript"></script>
</head>

<body id="thebod">
<h1><a href="http://www.edwardbenson.com/projects/ejs/"><img src="ejs.gif" alt="EJS - Embedded JavaScript" /></a></h1>
<h2>Demo Page</h2>
<p>This page is a quickly cobbled together demo of compiling EJS from a DOM source and from a String source. For more information and demos, see <a href="http://www.edwardbenson.com/projects/ejs">EJS on the web</a>.</p>

<div class="example">
<h3>Example 1: Running from the a String</h3>
<h4><a href="#" onClick="testUsingText();return false;">Run</a></h4>
<p>This example compiles and runs EJS from a String stored in the example.js file included with this project.</p>
</div>

<div class="example">
<h3>Example 2: Running from the DOM </h3>
<h4><a href="#" onClick="testUsingDOM();return false;">Run</a></h4>
<p>This example compiles and runs EJS from the DOM node directly below this sentence.</p>
<div id="source_code">
[% 	var title = "Items to buy!"; %]
<h1>[%= title %]</h1>
<ul>
[% ['cupcake', 'hardware'].each(function(item) { %]<li>[%= item %]</li>[% }); %]
</ul>
</div>
</div>
<hr>
<div class="output">
<h3>Compiled Code</h3>

<div id="output_code">
</div>
</div>
<div class="output">
<h3>Compilation Results</h3>
<div id="output_results">
</div>
</div>
<br />

</div>
<br /><br /><br />
<p align="center">Copyright &copy; 2007 Edward Benson<br /><a href="http://www.edwardbenson.com/">edwardbenson.com</a></p>
</body>
</html>